package com.bubbles.workspace.sync.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Properties;

/**
 * <p>description:  </p>
 *
 * @author CryptoNeedle
 * @date 2025-06-23
 */
@Getter
@AllArgsConstructor
public class Mysql extends Database {
    
    public final String jdbcDriverClass = "com.mysql.cj.jdbc.Driver";
    
    private final String jdbcUrlTemplate = "jdbc:mysql://%s:%d/%s?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai";
    
    @Override
    public String getJdbcUrlTemplate(ConnectType connectType) {
        return this.getJdbcUrlTemplate();
    }
    
    @Override
    public Properties getProperties() {
        Properties properties = new Properties();
        properties.setProperty("useSSL", "false");
        return properties;
    }
    
    @Override
    public String getDatabaseValidSql() {
        return "SELECT 1";
    }
    
    @Override
    public String getDatabaseVersionSql() {
        return "SELECT VERSION() AS version";
    }
    
    @Override
    public String getDatabaseStatisticSql() {
        return "";
    }
    
    @Override
    public String getTableSql(String sourceDatabaseName) {
        return "";
    }
    
    @Override
    public String getColumnSql(String sourceDatabaseName) {
        return "";
    }
    
    @Override
    public String getConstraintPrimarySql(String sourceDatabaseName) {
        return "";
    }
    
    @Override
    public String getConstraintUniqueSql(String sourceDatabaseName) {
        return "";
    }
    
    @Override
    public String getConstraintForeignSql(String sourceDatabaseName) {
        return "";
    }
    
    @Override
    public String getConstraintCheckSql(String sourceDatabaseName) {
        return "";
    }
    
    @Override
    public String getIndexUniqueSql(String sourceDatabaseName) {
        return "";
    }
    
    @Override
    public String getDmlTrackSql(String sourceDatabaseName) {
        return "";
    }
}